#include <iostream>
#include <stdlib.h>
#include <math.h>

//main()函数的定义
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main(int argc, char** argv) {
 double x;

    //循环输入数据计算对数
    do {
        cout<<"x=";
        cin>>x;
        if (x<=0) break;
        cout<<"log("<<x<<")="<<log(x)<<endl;
        cout<<"log10("<<x<<")="<<log10(x)<<endl;
    } while(1);
}